package cn.com.surker.sale.service;

import cn.com.surker.sale.entity.SaleContractInfoPrice;
import cn.com.surker.sale.entity.SaleContractStrengthPrice;
import cn.com.surker.spring.RestResultDto;
import cn.com.surker.system.entity.SysUser;
import cn.com.surker.vo.sale.SaleContractInfoPriceVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* <p>
    * 销售合同信息价 服务类
    * </p>
*
* @author admin
* @since 2024-07-28
*/
public interface SaleContractInfoPriceBaseService extends IService<SaleContractInfoPrice> {

    /**
     * 计算信息价
     * @param orgId
     * @param conId
     * @param today
     * @return
     */
    List<SaleContractStrengthPrice> calcInfoPrice(Long orgId, Long conId, String today, String takeTime,
                                                  Integer roundType, Double addPrice) throws Exception;

    /**
     * 分页功能
     * @param searchVal 关键字
     * @param startDate 开始月份
     * @param audit   是否审核(0:未审核1:已审核)
     * @param offset
     * @param limit
     * @return
     */
    IPage<SaleContractInfoPriceVO> queryPage(String searchVal, String startDate, Integer audit,Integer status, Integer offset, Integer limit);

    /**
     * 新增数据
     * @param dto page
     * @return
     */
    RestResultDto saveInit(SaleContractInfoPrice dto, SysUser user);

    /**
     * 更新所有数据
     * @return
     */
    RestResultDto update(Long id,String price,String taxPrice,String remark,SysUser user);

}
